﻿// owner 蒋家伟

#pragma once
#include "IDocument.h"

namespace jsdk
{
    using RunTimeId = uint64_t;
    class DocumentManager
    {
    public:
        static DocumentManager& get();

        /// \ brief 创建一个空文档
        IDocument* createEmptyDocument();

        /// \ brief 打开一个文档
        IDocument* openDocument(const std::wstring& path);
    private:
        std::unordered_map<RunTimeId, OwnerPtr<IDocument>> m_RunTimeIdToDocUMap;  // 运行时ID与文档
    };
}
